﻿using System;
using Xunit;

namespace Unity.String.Tests.Exceptions
{
    public class StringFormatterExceptionTest
    {
        [Fact]
        public void MethodsTest()
        {
            Assert.Throws<ArgumentException>(() =>
            {
                string testParamName = "testParamName";
                StringFormatterException.ThrowArgumentException(testParamName);
            });
            
            Assert.Throws<ArgumentException>(() =>
            {
                int testIndexValue = 0;
                int testLengthValue = 1;
                StringFormatterException.ThrowIndexException(testIndexValue, testLengthValue);
            });
           
            Assert.Throws<FormatException>(StringFormatterException.ThrowFormatException);
            Assert.Throws<FormatException>(StringFormatterException.ThrowFormatError);
        }
    }
}